package com._101aiot.auth.exception;

import com._101aiot.web.exception.BusinessExceptionAssert;
import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * 在业务模块编写此类，然后基础 BusinessExceptionAssert
 * 业务异常枚举
 */
@Getter
@AllArgsConstructor
public enum ResponseEnum implements BusinessExceptionAssert {


    /**
     * 请输入账号
     */
    AUTH_USERNAME_NONE( "20000", "请输入账号！"),
    /**
     * 请输入密码
     */
    AUTH_PASSWORD_NONE( "20001", "请输入密码！"),

    /**
     * 申请令牌失败
     */
    AUTH_LOGIN_APPLY_TOKEN_FAIL( "30001", "申请令牌失败！"),

    /**
     * 存储令牌失败
     */
    AUTH_LOGIN_TOKEN_SAVE_FAIL( "30002", "存储令牌失败！"),

    /**
     * 账号不存在
     */
    AUTH_ACCOUNT_NOT_EXISTS( "20003", "账号不存在！"),

    /**
     * 账号或密码错误
     */
    AUTH_CREDENTIAL_ERROR("20004", "账号或密码错误！"),

    ;

    /**
     * 返回码
     */
    private final String code;

    /**
     * 返回消息
     */
    private final String message;

    @Override
    public boolean getSuccess() {

        return false;
    }

}